Skip to content

feat: Use Store API pagination for serial logs table#5684

Merged
steverydz merged 1 commit intomainfrom
WD-35798-update-pagination-for-serial-logs-table
May 5, 2026
Merged

feat: Use Store API pagination for serial logs table#5684
steverydz merged 1 commit intomainfrom
WD-35798-update-pagination-for-serial-logs-table

Conversation

@steverydz
Copy link
Copy Markdown
Contributor

@steverydz steverydz commented Apr 30, 2026

Done

  • Updates the pagination to use the next-cursor parameter from the Store API
  • Drive by: Fix setting of search params on remodel view

How to QA

Testing

  • This PR has tests
  • No testing required (explain why):

Security

  • Security considerations for review (list them):
    • Examples:
    • Access control: users can only access their own data
    • Input: user input is validated and sanitised
    • Sensitive data: secret or private data is not exposed in any way
    • ...
  • This PR has no security considerations (explain why): No user input

Issue / Card

Fixes https://warthogs.atlassian.net/browse/WD-35798

Screenshots

n/a

UX Approval

  • This PR does not require UX approval
  • This PR does require UX approval (add context):

Copilot AI review requested due to automatic review settings April 30, 2026 08:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the publisher “Serial logs” UI and API proxy to use cursor-based pagination (Store API pagination) rather than client-side table pagination.

Changes:

  • Update the serial logs Flask endpoint to forward pagination/filter params as a single params object to the Store API gateway.
  • Replace client-side table pagination with cursor-driven pagination controls in the Serial Logs page and table.
  • Adjust the useSerialLogs hook API (rename nextPagepage) and update its tests; bump canonicalwebteam.store-api dependency.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
webapp/endpoints/models.py Changes serial log endpoint to forward pagination/filter params via a dict.
static/js/publisher/pages/SerialLog/SerialLogTable.tsx Replaces TablePagination usage with cursor-based TablePaginationControls and adds required pagination props.
static/js/publisher/pages/SerialLog/SerialLog.tsx Adds cursor state/history and wires pagination controls to useSerialLogs.
static/js/publisher/pages/Remodel/Remodel.tsx Adjusts search param updates for page size to preserve existing params.
static/js/publisher/layouts/ModelDetailsPageLayout/ModelNav.tsx Conditionally shows “Serial log” tab based on useSerialLogs success.
static/js/publisher/hooks/useSerialLogs.ts Renames cursor param to page, refines query key, and sets cursor query param.
static/js/publisher/hooks/tests/useSerialLogs.test.tsx Updates tests to use page instead of nextPage.
requirements.txt Bumps canonicalwebteam.store-api from 7.8.2 to 7.8.3.

Comment thread static/js/publisher/layouts/ModelDetailsPageLayout/ModelNav.tsx
Comment thread webapp/endpoints/models.py
Comment thread webapp/endpoints/models.py
Comment thread static/js/publisher/pages/SerialLog/SerialLogTable.tsx
Comment thread static/js/publisher/pages/SerialLog/SerialLog.tsx Outdated
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 30, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node dist/index.js --exec install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@steverydz steverydz force-pushed the WD-35798-update-pagination-for-serial-logs-table branch from 06bfe55 to 49c46d9 Compare April 30, 2026 09:28
@edisile edisile self-requested a review May 4, 2026 08:49
@steverydz steverydz merged commit 9b03141 into main May 5, 2026
14 checks passed
@steverydz steverydz deleted the WD-35798-update-pagination-for-serial-logs-table branch May 5, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants